# Contributor: Vladimir Luzan <vluzan@disroot.org>
# Maintainer: Vladimir Luzan <vluzan@disroot.org>
pkgname=qt5ct
pkgver=1.8
pkgrel=0
pkgdesc="Qt5 configuration tool"
url="https://sourceforge.net/projects/qt5ct/"
arch="all"
license="BSD-2-Clause"
makedepends="cmake qt5-qtbase-dev qt5-qttools-dev samurai"
subpackages="$pkgname-dev"
source="https://sourceforge.net/projects/qt5ct/files/qt5ct-$pkgver.tar.bz2"
options="!check" # no tests

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
5417850fb2bad4faaed59c8af61bec04c1ee7fefe8495286571e257b2f68cd417d36439c66fcfac28bb735c753a4ca4cec327b74e97e5ce8c2d4e36b3e4fba28  qt5ct-1.8.tar.bz2
"
